/**
 * (c)Copyright 2007 SinoCredit Co,Ltd. All Rights Reserved.  
 * SystemAction.java, 1:31:59 PM 
 * @author Ming.Shi
 * @since Nov 5, 2007
 * @version 1.0
 */
package com.sys.web.action;

import javax.servlet.ServletContext;

import org.springframework.web.context.support.WebApplicationContextUtils;

import com.sys.plat.web.core.ActionContext;
import com.sys.plat.web.core.BaseAction;
import com.sys.service.LogInfoService;
import com.sys.system.Constants;

public class SystemAction extends BaseAction {
	public String reLoad() {
		
		
		ServletContext context = ActionContext.getRequest().getSession().getServletContext();
		LogInfoService service = (LogInfoService) WebApplicationContextUtils.getWebApplicationContext(context).getBean("LogInfoServiceImpl");
		try {
			context.setAttribute(Constants.SYS_LOGSETTINGS, service.initLogSettings());
			context.setAttribute(Constants.SYS_RIGHTSETTINGS, service.initRightSettings());
			addMsg("SYSTEM_RELOAD_OK");
		} catch (Exception e) {
			addMsg("SYSTEM_RELOAD_NO");
			e.printStackTrace();
		}
		return "reLoad";
	}
	
	public String inreLoad(){
		return "reLoad";
	}
}
